/*
 * IflowMaterial.C
 *
 *  Created on: Jul 31, 2019
 *      Author: liuxiao
 */

#include "IflowMaterial.h"
#include "libmesh/quadrature.h"
#include "libmesh/system.h"
#include "libmesh/radial_basis_interpolation.h"
#include<iostream>
using std::cout;
using std::endl;

registerMooseObject("TrilobitaApp", IflowMaterial);

template<>
InputParameters validParams<IflowMaterial>()
{
  InputParameters params = validParams<Material>();

  params.addParam<std::vector<Real>>("flowdirection_vector", "The vector of inflow direction");
  return params;
}

IflowMaterial::IflowMaterial(const InputParameters & parameters) :
      Material(parameters),
	  _inflow_direction_x(declareProperty<Real>("inflow_direction_x")),
	  _inflow_direction_y(declareProperty<Real>("inflow_direction_y")),
	  _inflow_direction_z(declareProperty<Real>("inflow_direction_z")),
	  _flowdirection_vector(getParam<std::vector<Real>>("flowdirection_vector"))
{

}


void IflowMaterial::computeProperties()
{


	for(_qp = 0; _qp < _qrule->n_points(); ++_qp)
	{
		_inflow_direction_x[_qp] = _flowdirection_vector[0];
		_inflow_direction_y[_qp] = _flowdirection_vector[1];
		_inflow_direction_z[_qp] = _flowdirection_vector[2];
	}
}



